﻿using System;
using System.Collections.Generic;

using CrudServices;
using CrudServices.Wcf.Client;

using Northwind.Model;

namespace Client
{
    internal static class Program
    {
        private static void Main()
        {
            var client = new CrudClient(new CrudClientWcf("NorthwindDataService"));
            IEnumerable<Product> products = client.Search<Product>(SearchCriteriaBuilder.From<Product>().OrderBy(p => p.ProductName).SelectAll());
            foreach (Product product in products)
                Console.WriteLine(product.ProductName);
            Console.Read();
        }
    }
}